1. Field of the Invention
The invention relates to a method of recording and/or verifying predetermined information on an information recording medium on the basis of a command which is sent from a host computer through an SCSI (Small Computer System Interface).
2. Related Background Art
SCSI is an interface which has been examined in the Work Committee of ANSI (American National Standard Institute) X3T9.2 on the basis of the interface SASI (Shugart Associates System Interface) for connecting a small computer and its peripheral devices which is made by Shugart Associates Co., Ltd. of the U.S.A. and has been standardized as ANSI X3.131-1986. The SCSI is at present becoming a standard interface for connecting a personal computer and its peripheral devices. In recent years, on the other hand, work on standardizing SCSI-2 as an expanded version of the SCSI is being performed. However, the SCSI-2 standards are not yet finally determined. There are the following five points of the SCSI interface rules which are specified by the ANSI.
(1) Kinds and definitions of interface signals and timings for signal transmission and reception.
(2) A protocol to specify an operation sequence as an interface and definitions of phases or the like.
(3) Physical interface conditions of cable specifications, connector specifications, and the like, and electrical conditions of the electrical transmission system.
(4) A command system to execute various controls of the peripheral devices and a data transfer, formats of commands, and functions of the commands.
(5) A status byte format to designate the result of execution of the command to a host computer, and a structure for sense data to designate an abnormality state or the like during the execution of the command.
The command system in the above item (4) is as follows. First, the SCSI command is classified into eight kinds of groups. The first byte of a CDB (Command Descripter Block) is an operation code and its upper three bits designate a group code and its lower five bits designate a command code (code indicative of the kind of command) of every group. A length of CDB is specified as follows for every group.
(1) Group 0 . . . 6 bytes PA1 (2) Group 1 . . . 10 bytes PA1 (3) Groups 2-4 . . . reserved PA1 (4) Group 5 . . . 12 bytes PA1 (5) Groups 6-7 . . . vendor unique (specified by the manufacturer)
The CDB of the groups 6 and 7 denotes a group of commands which can be defined so as to be unique for the SCSI device. In each command, a logical block address is constructed by continuously arranging data blocks of a fixed length on a logical unit.
FIG. 1 is a diagram showing a construction of a logical block in a hard disc device. In FIG. 1, data block of a cylinder=0 and a sector=0 is set to a logical block address=0. Each time each of the sector, track, and cylinder is increased by "1" in accordance with this order, the logical block address is increased by "1". The logical block address is excellent with respect to a point that since an initiator (host computer) designates the logical block address of the first data block and the number of processing blocks and accesses the data, there is no need to be aware of a physical structure. Therefore, when the above logical block addressing is used, in the case where the devices in which the numbers of cylinders, tracks, sectors, and the like are different are connected, they can be made operative by the same software.
FIG. 2 is a diagram showing a general example of a system construction of the SCSI. As a logical unit, generally, as shown in FIG. 2, a physical device such as a hard disc or the like is often connected. The logical unit number (LUN) can be assigned to the physical device or can be also assigned to a virtual device. In the SCSI, ordinarily, eight logical units of LUN=0 to 7 can be connected onto an SCSI bus. Further, by using an expansion message, up to 2048 logical units can be connected.
FIG. 3 shows an example of the CDB of a Write command of the group 0. In FIG. 3, Logical Unit Number indicates a target logical unit of the command, Logical Block Address indicates a logical block which is executed at the first of the command, and Transfer Length indicates the number of logical blocks in which the commands are continuously executed, respectively. For instance, in case of the Write command, data is recorded into the continuous logical blocks as many as the number of logical blocks indicated by Transfer Length from the logical block address shown by Logical Block Address of the logical unit indicated by Logical Unit Number. In the SCSI interface, when the execution of the command is correctly finished, the target returns a good status to the initiator. On the other hand, when the execution of the command is incorrectly finished, the target returns a check condition status and also forms sense data as shown in, for example, FIG. 4. In FIG. 4, Valid indicates whether Information Bytes of the bytes 3 to 6 are valid or not. They are valid when Valid=1. Error Class and Error Code indicate a format of sense data. When Error Class=7 and Error Code=0, the data format indicates expansion sense data. Sense Key indicates the kind of error. Information Byte indicates a location (logical block) at which the error has occurred. Additional Sense Length indicates the number of bytes of additional sense data of the byte 8 and subsequent bytes. Sense Code indicates detailed information of the error.
When a check condition status is returned from the target in response to the command generated, the initiator generates a request status command and receives the sense data formed by the target and can know the kind of error from Sense Key and Sense Code. Or, when Valid=1, the initiator can know the location of the error from Information Byte. As mentioned above, when a command is given to a plurality of logical blocks, it is a general way that the target sets sense data at the time point of the occurrence of the error and finish the execution of the command by the check condition status. For instance, in case of a Read command of five continuous logical blocks of the logical blocks 1 to 5, when a read error occurs during the reading operation of the logical block 3, the target sets Sense Key in the sense data into 3h (Medium Error), sets Sense Code into 11h (Read Error), sets Information Byte into 3 (logical block in which the error has occurred), sets Valid into 1 to indicate that the information byte is valid, and returns the check condition status. The initiator receives the sense data by a request status command and again generates the Read command from the logical block 3 shown in Information Byte, thereby making it possible to retry to eliminate the error. As described above, Information Byte generally indicates the logical block address at which the initiator should subsequently retry.
On the other hand, as conventional information recording media, a floppy disk for magnetically recording and reproducing, an optical information recording medium for optically performing the recording and reproduction, and the like are known. As forms of the optical information recording medium, various types of a disk shape, a card shape, a tape shape, and the like are known. Among such optical information recording media, a card-shaped optical information recording medium (hereinafter, called an optical card) is small and light and is conveniently portable, so that a large demand is expected as an information recording medium of a relatively large capacity. The information recording medium is classified into two types such as a type in which information can be erased and rewritten and a type in which the recorded information cannot be erased and rewritten in accordance with the characteristics of the medium. Generally, the optical card is of the unerasable and unrewritable type and the application in the field such as a medical field or the like in which a feature such that the recorded information cannot be rewritten becomes advantageous is expected. In the recording/reproducing apparatus of such an optical card, in general, the optical card and a light beam for recording and reproducing are relatively reciprocated and information is recorded onto and reproduced from the recording surface of the optical card. In order to position the light beam to a desired track on the recording surface, light beam control techniques such as automatic focusing (AF), automatic tracking (AT), and the like are used.
Although the optical card is generally the type in which the information cannot be erased and rewritten as mentioned above, there are the following problems in the case where the Write command to a plurality of blocks is generated to such an optical card and the automatic tracking (AT) is made inoperative during the recording of a certain logical block (sector) on one track. That is, when it is now assumed that the logical block address in which the AT had been made inoperative has been set into Information Byte, the initiator tries to retry (to write in this case) from such a logical block. However, some recording has already been performed (there is no guarantee such that information has correctly been recorded) in the logical block before the AT is made inoperative. Therefore, information is overwritten onto the recorded information, so that the correct recording cannot be expected.
The case of a Write and Verify command will now be similarly considered. In the case where a plurality of logical blocks (sectors) are arranged on one track as in the optical card or optical disc, by repeating the operations to write and verify information every sector, processes such that information is written in a lump into the logical blocks existing on the same track in the logical block range designated by the CDB of the command and the written information is verified in a lump after that are executed. Since the processing time is reduced by processing every track as mentioned above, such a method is generally used. However, in the case where the AT had been made inoperative during the execution of the writing operation of the Write and Verify command for performing such processes, if the logical block address in which the AT had been made inoperative has been set into Information Byte, the following problem occurs in addition to the problem similar to those in case of the Write command mentioned above. That is, although the recording operation was executed to the logical block which had been recorded until a time point at which the AT has been made inoperative, the verifying operation is not executed. Therefore, there is a problem such that in spite of the fact that there is no guarantee such that the data has correctly been recorded, there is no means of informing a fact that the verifying operation is not executed to the initiator, so that the reliability of the data deteriorates.
As described above, in the conventional information recording/reproducing method of recording and reproducing predetermined information onto/from the information recording medium on the basis of the command from the host computer through the SCSI, there is only Information Byte as information to judge the block to be subsequently retried by the initiator. Further, the logic block address in which the actual error has occurred is set into Information Byte. Accordingly, in the case where an error occurs in the command such as Write command or Write and Verify command accompanied with the recording operation for the unerasable and unrewritable medium, there is a case where the information set into Information Byte is not effectively useful as information for the retry that is executed by the initiator. There are drawbacks such that a vain retry occurs in the retrying process at the time of occurrence of the error and the processing time increases and the reliability of the data deteriorates.